<script lang="ts" setup>
import { ref } from 'vue';
import open from './assets/close.svg'
import close from './assets/open.svg'

const ison=ref(false)
const change=()=>{
  ison.value=!ison.value
}
</script>

<template>
  <button @click="change">点击切换</button>
  <p>{{ ison }}</p>
  <img :src="ison? open:close" alt="">
</template>